package cn.genmer.test.security.concurrent;

import javax.annotation.PostConstruct;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

/**
 * @program: securitydeomo
 * @description:
 * @author: Genmer
 * @create: 2022-04-22 21:38
 **/
public class ScheduledTask {

    @PostConstruct
    public void task(){
        ScheduledExecutorService threadPool = Executors.newScheduledThreadPool(1);
        threadPool.scheduleAtFixedRate(new Runnable() {
            @Override
            public void run() {

            }
        }, 100, 10, TimeUnit.MILLISECONDS);
    }
}
